#include <stdio.h>

int main()
{
	freopen("test.in", "r", stdin);
	freopen("test.out", "w", stdout);
	int n = 0;
	scanf("%d", &n);
	long long f1 = 0;
	long long f2 = 1;
	if ( n == 0 ) {
		printf("0");
		return 0;
	}
	if ( n == 1 ) {
		printf("1");
		return 0;
	}
	
	long long fn = 0;
	for ( int i = 2; i <= n; i++ ) {
		fn = f1 + f2;
		f1 = f2;
		f2 = fn;	
	}
	printf("%lld", fn);
	fclose(stdin);
	fclose(stdout);
	return 0;
}
